<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>抽奖转盘和表单</title>
    <style>
        body {
            margin: 0;
            padding: 0;
            overflow: hidden;
            font-family: Arial, sans-serif;
        }

        #spinner-container {
            width: 100%;
            height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
            background: #E7E7E7;
        }

        #spinner {
            width: 80vmin;
            height: 80vmin;
            border-radius: 50%;
            position: relative;
            background-image: url("zhuanpan.png");
            background-size: cover;
            background-repeat: no-repeat;
        }

        #pointer {
            width: 30vmin;
            height: 30vmin;
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            /* 使用 translate 来固定位置 */

        }

        #zhuan {
            width: 100%;
            height: 100%;
            margin: 0;
            background-image: url("zhuan.png");
            background-size: cover;
            background-repeat: no-repeat;
            animation: pointerSpin 5s linear forwards;
            transform-origin: center center;
        }


        @keyframes pointerSpin {
            from {
                transform: rotate(0deg);
            }

            to {
                transform: rotate(360deg);
            }
        }


        #form-container {
            display: none;
            width: 100%;
            height: 100vh;
            background: #E7E7E7;
            position: absolute;
        }

        #form {
            max-width: 400px;
            margin: 0 auto;
            padding: 20px;
            background: #fff;
            border-radius: 5px;
            margin-top: 20px;
            border: 1px solid #E5E5E5;
        }

        label {
            display: block;
            margin-bottom: 5px;
            color: #666666;
        }

        input,
        select {
            width: 100%;
            padding: 10px;
            margin: 5px 0;
            border: 1px solid #E5E5E5;
        }

        button {
            width: 100%;
            padding: 10px;
            background: #F03D3C;
            color: #fff;
            border: none;
            cursor: pointer;
        }
    </style>
</head>

<body>
    <div id="spinner-container">
        <div id="spinner">
            <div id="pointer">
                <div id="zhuan"></div>
            </div>
        </div>
    </div>

    <div id="form-container">
        <div id="form">
            <label for="name">收货人姓名</label>
            <input type="text" id="name" placeholder="收货人姓名">

            <label for="phone">手机号码</label>
            <input type="tel" id="phone" placeholder="手机号码">

            <label for="code">手机验证码</label>
            <input type="text" id="code" placeholder="手机验证码">
            <button>获取验证码</button>

            <label for="address">选取地址</label>
            <select id="address">
                <option value="" disabled selected>选择省份</option>
                <!-- 添加省份选项 -->
            </select>

            <input type="text" placeholder="详细地址">
            <button>提交订单</button>
        </div>
    </div>

    <script>
        setTimeout(function () {
            // 显示表单
            document.getElementById("spinner-container").style.display = "none";
            document.getElementById("form-container").style.display = "block";
        }, 3000);  // 3秒后显示表单
    </script>
</body>

</html>